﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Application/Cart/Administration/MasterPage.master" AutoEventWireup="true" CodeFile="Categories.aspx.cs" Inherits="Application_Cart_Administration_Categories" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<tr>
	<td>
		<asp:GridView runat="server" ID="GridViewResults" AutoGenerateColumns="false" ShowFooter="false">
		<Columns>
			<asp:BoundField HeaderText="Id" DataField="Id" ItemStyle-HorizontalAlign="Right" />
			<asp:BoundField HeaderText="Parent Id" DataField="ParentCategoryId" ItemStyle-HorizontalAlign="Right" />
			<asp:BoundField HeaderText="Name" DataField="Name" />
			<asp:BoundField HeaderText="Description" DataField="Description" />
			<asp:BoundField HeaderText="Order" DataField="CategoryOrder" ItemStyle-HorizontalAlign="Right" />
			<asp:TemplateField HeaderText="#Products" HeaderStyle-Width="90px" ItemStyle-HorizontalAlign="Right">
			<ItemTemplate>
				(<a href="Products.aspx?categoryId=<%# Eval("Id") %>"><%# Eval("CountProducts")%></a>)
			</ItemTemplate>
			</asp:TemplateField>
			<asp:TemplateField HeaderStyle-Width="90px">
			<ItemTemplate>
				(<a href="CategoryForm.aspx?Id=<%# Eval("Id") %>">Edit</a> | <a href="Categories.aspx?delId=<%# Eval("Id") %>">Delete</a>)
			</ItemTemplate>
			</asp:TemplateField>
		</Columns>
		</asp:GridView>
	</td>
</tr>
<tr>
	<td style="text-align:right">
		<asp:Button runat="server" ID="ButtonAdd" Text="<%$ Resources:Resource, New %>" PostBackUrl="~/Application/Cart/Administration/CategoryForm.aspx" />
	</td>
</tr>

</table>
</asp:Content>

